package com.itheima.mapper;

import com.itheima.domain.UmsMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 后台菜单表 Mapper 接口
 * </p>
 *
 * @author zhuguo
 * @since 2022-11-10
 */
public interface UmsMenuMapper extends BaseMapper<UmsMenu> {



    /**
     * 修改菜单显示状态
     * @param id
     * @param hidden
     * @return
     */
    @Update("update ums_menu set hidden = #{hidden} where id = #{id};")
    Integer updateHiddenById(Integer id, Integer hidden);


    @Select("select * from ums_menu;")
    List<UmsMenu> getAll();
}
